	document.write('<script type="text/javascript" src="/js/jquery-1.7.1.min.js"></script>');

	function rtnMenuParam(b)
	{
		var bbs = "";
		if ( b != null )
			bbs = b;
		else
		{
			f = document.forms.frm;
			bbs = f.b.value;
		}
		var mnStr = "";
		if (bbs == "bn") {
			mnStr = "&menu1=04&menu2=01";
		}
		else
		if (bbs == "bf") {
			mnStr = "&menu1=04&menu2=02";
		}
		else
		if (bbs == "bq") {
			mnStr = "&menu1=04&menu2=03";
		}
		return mnStr;
	}

	function srch()
	{
		f = document.forms.frm;
		f.action='l.html'
		f.submit();
	}

	//write
	function wr(b)
	{
		document.location.href='w.html?b='+b+rtnMenuParam(b);
	}

	//write reply
	function wrr(b)
	{
		f = document.forms.frm;
		document.location.href='w.html?b='+b+rtnMenuParam(b)+"&m=r"+"&n="+f.n.value;
	}

	function sndFrm()
	{

		f = document.forms.frm;
		/*if (f.content.value == '') {
			return false;
		} else
			return true;
*/

		f.target = 'if_nvl';
		f.action = 'x.php';
		f.submit();
	}

	function rstFrm()
	{
		f = document.forms.frm;
		f.reset();
		if ( history.length > 2 ) {
			history.back();
		}
		else
			location.href='/bbs/l.html?b='+f.b.value + rtnMenuParam();
	}

	//list
	function gl(urlbase)
	{
		document.location.href='l.html?'+urlbase;
	}

	function v(b, no)
	{
		document.location.href='v.html?b='+b+'&no='+no+rtnMenuParam(b);
	}

	function x(mode)
	{
		f = document.forms.frm;
		f.target = 'if_nvl';
		f.action = 'x.php';
		f.m.value=mode;
		if ( confirm('삭제하시겠습니까?') ) {
			f.submit();
		}
	}

	function mx()
	{
		f = document.forms.frm;
		document.location.href='m.html?'+f.urlbase.value+'no='+f.n.value;
	}

//-----------------------------------------------------------------------------------------------------
	function fncGetArticleJSON(){
		 var b = "bf";

		$.ajax({
			type: 'POST',
			url: '/bbs/ajax_responseJSON.html',
			data: {
				  b:b
				, test:"test parameter"
				, type:'1'
			} ,
			dataType: 'json',
			traditional: true,
			success: function (response) {
				if (response.resultCode == '200') {
					var count 	= response.resultSet.length;
					var html 	= $('#tblArticleList').html();

					for ( i = 0 ; i < count ; i++ ) {
						var row 				= response.resultSet[i].row_array;
						var tid 					= row.tid;
						var writer_name 	= row.writer_name;
						var hit_count 		= row.hit_count;
						var reg_date 		= row.reg_date;
						var subject 			= row.subject;
						var no 					= row.no;
						var upload_file0 	= row.upload_file0;
						html += "<tr>";
						html += "<td>"+tid+"</td>";
						html += "<td class=\"title\" onClick=\"v('"+b+"', '"+no+"');\">"+subject+"</td>";
						html += "<td><span class='fileUp'></span></a></td>";
						html += "<td>"+writer_name+"</td>";
						html += "<td>"+reg_date+"</td>";
						html += "<td>"+hit_count+"</td>";
						html += "</tr>";
					}
					$('#tblArticleList').html(html);
				} else {
					alert('실패했습니다. 잠시 후에 다시 시도해 주세요');
				}
			},
			error: function (request, textStatus, errorThrown) {
				alert('실패했습니다. 잠시 후에 다시 시도해 주세요.');
			}
		});
	}


	function fncGetArticleHTML(){
		var b = "bf";

		$.ajax({
			type: 'POST',
			url: '/bbs/ajax_response.html',
			data: {
				  b:b
				, test:"test parameter"
				, type:'1'
			} ,
			dataType: 'html',
			traditional : true,
			success: function (response) {
				$('#tblArticleList').html(response);
			},
			error: function (request, textStatus, errorThrown) {
				alert('실패했습니다. 잠시 후에 다시 시도해 주세요.2');
			}
		});
	}
//-----------------------------------------------------------------------------------------------------